<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>warehouse KPI managment</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("Do you want to download the file？","Reminder",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/guest/usAttendanceGuest/export");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/guest/usAttendanceGuest/biwrehouseKpiList");
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
    <!--  
	<ul class="nav nav-tabs">
		<li class="active">仓库KPI监控列表</li>
	</ul>
	-->
	<form:form id="searchForm" modelAttribute="warehouseKpiMonitoring" action="${ctx}/guest/usAttendanceGuest/biwrehouseKpiList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		
		<ul class="ul-form">
			
			<li>
				<label>Date：&nbsp;</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${biWarehouseKpiData.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				&nbsp;--&nbsp;<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${biWarehouseKpiData.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>&nbsp;&nbsp;
			</li>
			
			<li class="btns">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="seach" onclick="return page();"/>
			<input id="btnExport" class="btn btn-primary" type="button" value="download"/>
			</li>
			<li class="clearfix"></li>
		</ul>
		
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>Warehouse</th>
				<th>Date</th>
				<th>Month</th>
				<th>Week</th>
				<th>Attendance Hours</th>
				<th>TTL Valid Hours</th>
				<th>Standard Hours</th>
				<th>Value Added Hours</th>
				<th>Unusual Hours</th>
				<th>Supporting Hours</th>
				<th>Valid Output</th>
				<th>NO. of Workers</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="biWarehouseKpiData">
			<tr>
				<td>
					${biWarehouseKpiData.warehouse}
				</td>
				<td>
					<fmt:formatDate value="${biWarehouseKpiData.date}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${biWarehouseKpiData.dateMonth}" pattern="yyyy-MM"/>
				</td>
				<td>
					${biWarehouseKpiData.strWeek}
				</td>
				<td>
					${biWarehouseKpiData.stunden}
				</td>
				<td>
					${biWarehouseKpiData.effectiveWorkingHours}
				</td>
				<td>
					${biWarehouseKpiData.standardWorkingHours}
				</td>
				<td>
					${biWarehouseKpiData.valueAddedHours}
				</td>
				<td>
					${biWarehouseKpiData.abnormalWorkingHours}
				</td>
				<td>
					${biWarehouseKpiData.supportWorkingHours}
				</td>
				<td>
					${biWarehouseKpiData.effectivePercentage}
				</td>	
				<td>
					${biWarehouseKpiData.employeeCount}
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>